/**
 * Created by wry on 2015/1/13.
 */

module.exports = function (app) {
    var report = require('../../controllers/backoffice/backOffice-report-controller')

    // 小区日报
    app.get('/rest/' + RESTFullServiceVersion + '/backoffice/reports/getCommunityMainStatsReport/:community', report.getBackOfficeCommunityMainStatsReport);
    app.get('/rest/' + RESTFullServiceVersion + '/backoffice/reports/getReport/:community/:date/:column/:interval', report.getBackOfficeReport);
    app.get('/rest/' + RESTFullServiceVersion + '/backoffice/reports/getRetentionByComm/:community/:interval', report.getBackOfficeRetentionByCommReport);
    app.get('/rest/' + RESTFullServiceVersion + '/backoffice/reports/getRetentionByCommAndBatch/:community/:userBatchDate/:interval', report.getBackOfficeRetentionByCommAndBatchReport);

    // Marketing
    app.get('/rest/' + RESTFullServiceVersion + '/backoffice/reports/getMarketingInviteList/:community', report.getBackOfficeMarketingInviteListReport);
    app.get('/rest/' + RESTFullServiceVersion + '/backoffice/reports/getMarketingInviteSentList/:community', report.getBackOfficeMarketingInviteSentListReport);

    // Click Source
    app.get('/rest/' + RESTFullServiceVersion + '/backoffice/reports/getClickSource/:startDate/:endDate', report.getBackOfficeClickSourceReport);

};